package com.cz.pay.controller;

import com.cz.pay.service.IPayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>支付订单控制器</p>
 * <pre>
 * @author gitamacai
 * @date 2019/12/9 10:03
 * </pre>
 */
@RestController
@RequestMapping("/pay/order")
public class PayOrderController {
    @Autowired
    private IPayService payService;

    @RequestMapping(value = "/reduce", produces = "application/json")
    public Boolean debit(String userId, int money) {
        payService.reduce(userId, money);
        return true;
    }
}
